Platform Explorer / Nuxeo Platform 5.8

Contribution org.nuxeo.ecm.social.mini.message.gadgets--gadget

This contribution is part of XML component org.nuxeo.ecm.social.mini.message.gadgets inside nuxeo-mini-message-5.8.jar

Extension Point

Extension point gadget of component service.

Contributed Items

  • <internalGadget disabled="false" name="minimessages">
          <documentation>
            This gadget displays the mini messages of a user, or the mini messages
            of the user's network.
    
            The following user preferences can be used to configure it:
            - activityLinkBuilder: activity link builder name to use to generate
              documents and user URLs
            - miniMessagesStreamType: can be 'forActor' to display the mini messages
              of the user's network, or 'fromActor' to display only the user
              mini messages.
            - actor: the actor for which to display the activities,
              default is the current user username.
    
            How to include the minimessages gadget in a JSF context:
            <code>
              <div class="gadget-minimessages threeQuarterWidth"/>
              <script type="text/javascript">
                jQuery('.gadget-minimessages').openSocialGadget({
                  baseURL: '#{baseURL}',
                  language: '#{localeSelector.language}',
                  gadgetDefs: [
                    { specUrl: '#{gadgetsBaseURL}/site/gadgets/minimessages/minimessages.xml',
                      title: '',
                      userPrefs: {
                        activityLinkBuilder: {
                          value: 'default'
                        },
                        miniMessagesStreamType: {
                          value: 'forActor'
                        }
                      },
                      displayTitleBar: false,
                      width: '100%'
                    }
                  ]
                });
              </script>
            </code>
    
            How to include the minimessages gadget in a WebEngine page:
            <code>
              <link href="${contextPath}/css/opensocial/light-container-gadgets.css" rel="stylesheet"/>
              <script src="${contextPath}/opensocial/gadgets/js/rpc.js?c=1" type="text/javascript"/>
              <script src="${contextPath}/js/?scripts=jquery.js|opensocial/cookies.js|opensocial/util.js|opensocial/gadgets.js|opensocial/cookiebaseduserprefstore.js|opensocial/jquery.opensocial.gadget.js" type="text/javascript"/>
    
              <div class="gadget-minimessages gadgets-gadget-chrome"/>
              <script type="text/javascript">
                $('.gadget-minimessages').openSocialGadget({
                  baseURL: '${contextPath}' + '/',
                  language: '${Context.locale.language}',
                  gadgetDefs: [{
                    specUrl : '${Runtime.getProperty('nuxeo.loopback.url')}/site/gadgets/minimessages/minimessages.xml',
                    userPrefs: {
                      activityLinkBuilder: {
                        value: 'default'
                      },
                      miniMessagesStreamType: {
                        value: 'forActor'
                      }
                    },
                    displayTitleBar: false,
                    width: '100%'
                  }]
                });
              </script>
            </code>
          </documentation>
    
          <mountPoint>/minimessages</mountPoint>
          <entryPoint>minimessages.xml</entryPoint>
          <category>Nuxeo</category>
          <icon>gadget-minimessages.png</icon>
        </internalGadget>

    This gadget displays the mini messages of a user, or the mini messages of the user's network. The following user preferences can be used to configure it: - activityLinkBuilder: activity link builder name to use to generate documents and user URLs - miniMessagesStreamType: can be 'forActor' to display the mini messages of the user's network, or 'fromActor' to display only the user mini messages. - actor: the actor for which to display the activities, default is the current user username. How to include the minimessages gadget in a JSF context: How to include the minimessages gadget in a WebEngine page:

XML Source

<extension point="gadget" target="org.nuxeo.opensocial.gadgets.service">

    <internalGadget disabled="false" name="minimessages">
      <documentation>
        This gadget displays the mini messages of a user, or the mini messages
        of the user's network.

        The following user preferences can be used to configure it:
        - activityLinkBuilder: activity link builder name to use to generate
          documents and user URLs
        - miniMessagesStreamType: can be 'forActor' to display the mini messages
          of the user's network, or 'fromActor' to display only the user
          mini messages.
        - actor: the actor for which to display the activities,
          default is the current user username.

        How to include the minimessages gadget in a JSF context:
        <code>
          <div class="gadget-minimessages threeQuarterWidth"/>
          <script type="text/javascript">
            jQuery('.gadget-minimessages').openSocialGadget({
              baseURL: '#{baseURL}',
              language: '#{localeSelector.language}',
              gadgetDefs: [
                { specUrl: '#{gadgetsBaseURL}/site/gadgets/minimessages/minimessages.xml',
                  title: '',
                  userPrefs: {
                    activityLinkBuilder: {
                      value: 'default'
                    },
                    miniMessagesStreamType: {
                      value: 'forActor'
                    }
                  },
                  displayTitleBar: false,
                  width: '100%'
                }
              ]
            });
          </script>
        </code>

        How to include the minimessages gadget in a WebEngine page:
        <code>
          <link href="${contextPath}/css/opensocial/light-container-gadgets.css" rel="stylesheet"/>
          <script src="${contextPath}/opensocial/gadgets/js/rpc.js?c=1" type="text/javascript"/>
          <script src="${contextPath}/js/?scripts=jquery.js|opensocial/cookies.js|opensocial/util.js|opensocial/gadgets.js|opensocial/cookiebaseduserprefstore.js|opensocial/jquery.opensocial.gadget.js" type="text/javascript"/>

          <div class="gadget-minimessages gadgets-gadget-chrome"/>
          <script type="text/javascript">
            $('.gadget-minimessages').openSocialGadget({
              baseURL: '${contextPath}' + '/',
              language: '${Context.locale.language}',
              gadgetDefs: [{
                specUrl : '${Runtime.getProperty('nuxeo.loopback.url')}/site/gadgets/minimessages/minimessages.xml',
                userPrefs: {
                  activityLinkBuilder: {
                    value: 'default'
                  },
                  miniMessagesStreamType: {
                    value: 'forActor'
                  }
                },
                displayTitleBar: false,
                width: '100%'
              }]
            });
          </script>
        </code>
      </documentation>

      <mountPoint>/minimessages</mountPoint>
      <entryPoint>minimessages.xml</entryPoint>
      <category>Nuxeo</category>
      <icon>gadget-minimessages.png</icon>
    </internalGadget>

  </extension>